// import AppDispatcher from '../dispatcher/AppDispatcher';
// import { ADD_TODO } from '../constants/actionTypes';

import { createAction } from 'redux-actions';
import {
    CREATE_TODO,
    DELETE_TODO,
    CHANGE_TEXT,
} from '../constants/actionTypes';

export const createTodo = createAction('CREATE_TODO');
export const deleteTodo = createAction('DELETE_TODO');
export const changeText = createAction('CHANGE_TEXT');


// export const TodoActions = {
//     addTodo(text) {
//         AppDispatcher.handleAction({
//             type: ADD_TODO,
//             payload: {
//                 text,
//             },
//         });
//     },
// };